When intra-predictive coding is performed on a video or an image, predictive coding is performed on blocks, which are divided from a current coded image, according to different prediction directions (prediction modes) so as to eliminate spatial redundancy of a video signal to obtain a prediction residual signal. Then the prediction residual signal is transformed so as to further centralize signal energy. Quantized transformed coefficients need to be scanned before entropy coding, so that a two-dimensional image signal or video signal is converted into a one-dimensional signal to facilitate processing of an entropy coding device. With the scanning, after a two-dimensional signal is converted into the one-dimensional signal, a signal amplitude is enabled to present a descending regular change, so as to adapt to the processing of the entropy coding device.
An existing video or image coding method adopts the coding technology based on a prediction direction. The coding technology uses the prediction direction as a guide signal, when a different prediction direction is selected, transform base and scanning order should be changed accordingly. In other words, the number of the scanning orders is the same as that of the prediction directions.
Although the method is capable of coding and decoding the video or image, a scanning order needs to be designed for each prediction direction, thereby increasing system complexity of a coder-decoder (codec) system. Especially, when an adaptive update scanning technology is adopted, each scanning order needs to be updated in real time, further increasing the system complexity of the codec system.